/**
 * Created by DukeCrushIt on 2015/8/25.
 */
//module game{
    class BuffInfo {
        public buffId:number;
        public endTime:number;
        public petId:number;
        public startTime:number;
        public isItem:boolean;
        public addition:number;
        public type:number;
        public constructor(data:any=null){
            //super();
            if(data != null)
                this.initFromData(data);
        }

        public initFromData(data:any){
            this.buffId = data.buffId;
            this.petId = data.petId;
            this.startTime = data.startTime;
            this.endTime = data.endTime;
            this.isItem = this.startTime == this.endTime;
            this.addition = data.addtion;
            this.type = data.type;
        }
    }
//}